package com.itheima.reggie.common;

/**
 * 基于ThreadLocal类，存储操作者id
 */
public class BaseContext {

    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setId(Long id){
        threadLocal.set(id);
    }

    public static Object getId(){
        return threadLocal.get();
    }
}
